﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NetFrameworkExtensions.PresentationLayer
{
  public interface IWindowContext
  {
    Guid? ParentGuid { get; set; }

    Guid? WindowGuid { get; set; }

    object ParentData { get; set; }

    object WindowData { get; set; }

    Action<bool> OnClose { get; set; }

    bool UseGlobalSynchronizationContext { get; set; }

    void CallOnClose(bool accept, bool remove = true);

    void Send(Action action);

    void Send(Action<object> action, object state);

    void Send<T>(Action<T> action, T state);

    void Post(Action action);

    void Post(Action<object> action, object state);

    void Post<T>(Action<T> action, T state);
  }

  public interface IWindowContextInternal
  {
    void ChangeWindowGuid(Guid newGuid);
    void ChangeParentGuid(Guid newGuid);
  }
}
